home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Libraries / VideoToolbox 94.11.17 / Changes < prev    next >
Encoding:
Text File  |  1994-11-17  |  13.2 KB  |  109 lines  |  [TEXT/ttxt]

  1. VideoToolbox: Changes
  2. November 17, 1994
  3.  
  4. CHANGES DURING 11/94
  5. •Polished all code to compile without any warnings. (CodeWarrior is fussy.)
  6. •Made everything compatible with THINK C 6 and 7, with Universal and pre-Universal headers. Eliminated use of THINK C's LoMem.h. (Thanks to David Brainard & Josh Solomon for reporting the incompatibilities.)
  7. •Notes:"CopyBits slavishly" explains how to faithfully CopyBits numbers from one pixmap to another. 
  8. •Notes:"newline & return.note" documents the inconsistent ways that MPW, THINK, and CodeWarrior C handle /n and /r.
  9. •CopyWindows.c provides a convenient high-level interface to CopyBits and CopyBitsQuickly, accepting windows (WindowPtr, CWindowPtr, or GWorldPtr) instead of pixmaps or bitmaps. HIGHLY RECOMMENDED!
  10. •GDOpenWindow has been significantly revised in light of "CopyBits slavishly", though the calling interface is unchanged. Added new routines: GetBitMapPtr(window) returns a pointer to the window's bitmap or pixmap. IsOffScreen(window) returns true only if the window is a GWorldPtr.
  11. •PixMapToEPS.c saves an image on disk as a PostScript EPSF file.
  12. •Quick3: fixed minor bug in SortAndMergeContrasts reported by Bart Farell. If there were more than 2 identical contrasts, the 3rd (and 5th, etc.) would not be merged. This had no effect on Weibull fits since they effectively treat each trial independently, but it did allow an extra degree of freedom per unmerged contrast to the monotonic fit.
  13. •SndPlay1.c: patch ExitToShell instead of calling _atexit().
  14. •Timer.c: PeekTimerSecs() works, and has no side effects.
  15. •VBLInstall.c: patch ExitToShell instead of calling _atexit().
  16. •WindowToEPS.c: saves the image in a window or GWorld to disk.
  17.  
  18. CHANGES DURING 10/94
  19. •As a gesture toward compatibility with Symantec C++, I've changed most instances of "THINK_C" to "(THINK_C || THINK_CPLUS)". However, I have not tried to compile under C++.
  20. •ChooseScreen.c: new routine that asks the user to select a screen.
  21. •fp.c: new file defines NCEG-compliant routines: ldtox80, x80told, and fpclassify, making them available on 68k as well as PowerPC.
  22. •HideMenuBar.c can now run native on PowerPC.
  23. •ImageStatistics.c, a new file, computes the minimum, maximum, mean, and mean square value of the pixels in a specified rect of a window or GWorld.
  24. •Luminance.h and all files: capitalized "luminanceRecord" to "LuminanceRecord". A typedef retains backward compatibility.
  25. •MoveMouse.c, from Apple, documents their new Cursor Device Manager.
  26. •Sane.c has been discarded; replaced by fp.c, described above. Calls to ExtendedToDouble(), DoubleToExtended(), and ClassOfDouble() must be replaced by calls to similar routines defined in fp.c.
  27. •SndCallBack1.c can now run native on PowerPC.
  28. •TimeCPU.c: no longer times the SANE routine RandomX(), which was uselessly slow and doesn't exist on PowerPC.
  29. •Timer.c: added PeekTimer and PeekTimerSecs, based on code from David Brainard.
  30. •Timer.c: patch ExitToShell instead of calling _atexit().
  31. •"CopyBits slavishly" a new document added to Notes folder, containing answers from Apple Developer Services to my questions.
  32. •VBLInstall.c: Added new "frame" field to VBLTaskAndA5 struct, which counts up from zero.
  33.  
  34. CHANGES DURING 8-9/94
  35. •All files: removed assumption in printf's that OSErr==int and that short==int. All instances of the variable "error" are now declared "int" and may be safely printed with "%d". 
  36. •Assign.c can now read Metrowerks CodeWarrior C style of printed NAN,  e.g. "NAN(021)", in addition to MPW and THINK C styles.
  37. •ATMInterface.c can now run native on PowerPC.
  38. •Luminance.c: If necessary, IncrementLuminance() now bumps up the upper luminance bound to include the incremented luminance.
  39. •RectToAddress.c was extracting the size (omitting flags) from rowBytes by ANDing with 0x1fff, which I've now changed to 0x3fff, as recommended by the Apple Tech Note "RowBytes Revealed".
  40.  
  41. CHANGES DURING 7/94
  42. •All files: updated to support the MetroWerks CodeWarrior C compiler and PowerPC, especially VideoToolbox.h, mc68881.h, Identify.c, Require.c, and ReadMATLABFile.c. Changed "thePort" to qd.thePort. Eliminated all use of the printf pascal-string format "%#s" since it's not supported by CodeWarrior. Nan.c, IsNan.c, and the IsFinite macro in VideoToolbox.h now support 8-byte doubles, which is the standard size on the PowerPC. The entire VideoToolbox now compiles without error under CodeWarrior, but has yet to be tested.
  43. • Assign.c: Added CopyDescribedVars. Fixed bug in ReadAssignmentStream and ReadAssignmentLine that garbled the returned error value. Found and fixed a memory leak in ReadAssignmentLine. 
  44. •ATMInterface.c: initATM does nothing if driver is already open.
  45. •GDVideo.c: added GDNameStr(), which returns a C string, otherwise like GDName(), which returns a pascal string.
  46. •GetTimeDateString.c: now suppresses leading zero in hours, e.g. "5:03 PM, Monday, September 13, 1993"
  47. •MultipleChoice.c: added a new function Choose() that is more convenient that both MultipleChoice() and YesOrNo(), and renamed the file to Choose.c. Fixed cosmetic bug: MultipleChoice() was backspacing one too many times.
  48. •SetEntriesQuickly.c was made compatible with compilers other than THINK C by making all use of the asm directive conditional on THINK_C. This disables all support for ProColor, Quadra, and Mac IIci and IIsi unless the file is compiled by THINK C.
  49. •SetPriority.c now does nothing if compiled as PowerPC code.
  50. •VideoToolbox.h: slightly adjusted the conditional definitions and inclusions relating to c2pstr and CtoPstr to restore compatibility with THINK C 5 and 6.
  51.  
  52. CHANGES DURING 6/94
  53. •Fixed bug that crashed ConvolveX.c, CopyBitsQuickly.c, CopyBitsQuicklyOld.c, PixMapToPostScript.c,  SetEntriesQuickly.c, SetOnePixel.c, and SetPixelsQuickly.c (and thus TimeVideo 2.5.6) when accessing a 32-bit address on a Mac whose ROMs were not 32-bit clean. For example, this made TimeVideo crash when testing a RasterOps 24L in a Mac IIx. It hadn't occurred to me that gestalt32BitCapable would return false on Macs with dirty ROMs even when the SwapMMUMode trap is available and should be called. The appropriate test is TrapAvailable(_SwapMMUMode). (Thanks to Margaret Bradley <BRADLEY@nervm.nerdc.ufl.edu> and Debbie Moore for the crash reports.)
  54. •AddExplicitPalette() now also calls the new VideoToolbox routine MakeColorTableExplicit(). This will tell CopyBits to faithfully copy your pixels as numbers, without color translation, when you copy from your window.  As a result you will now often be able to use CopyBits, with all its power, instead of my dumber substitute called CopyBitsQuickly.
  55. •Assign.c: Fixed bug in ReadAssignmentStream and ReadAssignmentLine that garbled the returned error number. Reduced maximum linelength from 80 to 76, for easier emailing of assignment files (but, alas, I'm still getting 80 character lines). Enhanced error message to reveal any spurious nonprinting characters in offending text.
  56. •CopyBitsQuickly.c: added support for BlockMoveData, but limited testing indicates no speed advantage, even on a Power Mac, so the new code is disabled.
  57. •CopyBitsQuickly.c: added new transfer mode: addOverQuickly adds the source to the destination, four bytes at a time. This gives maximum speed for cases in which you know overflow won't happen. Overflow may carry over into neighboring pixels within the image.
  58. •CopyBitsQuickly.c: Rewrote most of it, replacing all assembly code by portable C of similar speed. (Just in case, the old tried-and-true CopyBitsQuicklyOld.c is supplied as well.)
  59. •GDOpenWindow.c: In response to a query by David Brainard I now document the obscure fact that GDOpenWindow's frame (not content) will overlap onto other screens that are contiguous parts of the desktop.
  60. •Luminance.c: renamed "LtoEOrdered" to "LToEOrdered", fixing erroneous capitalization.
  61. •"demos" folder now has "noFPU" versions of all projects that formerly used the 68881 chip, for compatibility with a wider range of Macs, especially the Power Macs.
  62. •MaximizeConsoleHeight.c's documentation now acknowledges a limitation under 1-bit QuickDraw.
  63. •"Multisync Sense Pins.note" by  Philipp Biermann added to Notes folder.
  64. •PrintfGWorld.c now calls SetGDevice(GetMainDevice()) before calling printf, since attempts to write to the console fail unless the main device is the current device. 
  65. •"Read me" now gives advice on using CopyBits and BlockMoveData.
  66. •TimeVideo.c: This source file was mysteriously corrupted (several bad bytes) in the published version dated June 23, 1994. I restored it from a backup.
  67. •TimeVideo 3.0.1 adds to the SimpleText "TimeVideo results" document a 'styl' resource specifying Monaco font .
  68. •VideoToolbox.h: in the interest of portability, I've standardized on the names "c2pstr and p2cstr" because they're defined in Apple's Strings.h (rather than Symantec's pascal.h) and they're available in MacTraps (rather than MacTraps2), unlike the variously named alternatives: C2PStr, CtoPstr, P2CStr, and PtoCstr. However, for backwards compatibility, VideoToolbox.h guarantees that both c2pstr and CtoPstr and their mates p2cstr and PtoCstr are defined.
  69. •VideoToolbox.h: so that all users might freely use Apple's new BlockMoveData (see "Read Me"), VideoToolbox.h now declares it, if necessary, which provides compatibility with Apple's old pre-Universal header files.
  70. •Zoom.c now accepts a further argument, a pointer to the event record, which previously was accessed as a global variable. This will necessitate changes in all programs that call Zoom().
  71.  
  72. CHANGES DURING 5/94
  73. •Art Wixson says the ISR Video Attenuators are once again in stock. See the "Video Attenuator" document.
  74. •TimeCPU now includes timing for BlockMove() and BlockMoveData().
  75. •Made entire VideoToolbox compatible with Apple's Universal Headers. Renamed "DateString" to "DatedString", and "StringToDate" to "StringToDateAndSecs", to avoid conflict with Apple's Universal Headers. Made minor changes to CalibrateLuminance.c, FlushCacheRange.c, GDTime.c, PlotXY.c, SetMouse.c, SndPlay1.c,  Timer.c, and VBLInstall.c for compatibility with Apple's Universal Headers. (A bit more work may be required before these routines can be compiled to run native on the PowerPC.)  Thanks to Bob Dougherty (wolfgang@cats.ucsc.edu) for reporting the incompatibility.
  76. •To enhance compatibility with PowerPC, eliminated the use of low-memory globals in CopyQuickDrawGlobals.c, Sandstorm.c, and Zoom.c.
  77. •Nan.c defines a pre-computed global double called "Nan" that contains the value 0.0/0.0.
  78.  
  79. CHANGES DURING 4/94:
  80. •Added THINK C 7 projects.
  81. •GetScreenDevice.c: added GetRectDevice().
  82. •SetPixelsQuickly.c: enhanced to not flush its cache when writing to the main screen. In response to query by David Brainard.
  83.  
  84. CHANGES DURING 3/94:
  85. •Added ATMInterface.c and ATMInterface.h from Adobe Systems Inc., allowing direct access to Adobe Type Manager for special effects.
  86. •In Normal.c, added BoundedNormalIntegers(distribution,n,mean,sd,min,max), which fills the "distribution" array with n ordered integers so that random samples from the array, i=distribution[nrand(n)], will be samples from a bounded normal distribution.
  87. •In nrand.c, replaced all three routines (nrand, nrandU, and nrandUL) by one universal routine, nrand(), that returns an unsigned long value and uses integer arithmetic (as in the old nrandU) if n is small enough, and otherwise uses double arithmetic (as in the old nrandUL).
  88. •Added LtoE, EToL, and LtoEOrdered to Luminance.c. LtoE returns the index of the table entry in the specified range with luminance closest to L.
  89. •Changed DateString.c to produce shorter strings by omitting the periods:  "890625015959" instead of "89.06.25.01.59.59".
  90. •Rewrote Shuffle.c to accept an arbitrary elementSize. (All calling programs will need to be changed, to add the new argument.)
  91. •Deleted MyFgets.c from Quick3.
  92. •Added CVNetConvert by Izumi Ozhawa to the Utilities folder.
  93. •Added IdentifyOwner to Identify.c.
  94. •Added MacMemory.h and MacMemory.c which, if included in your project, redefine the Standard C memory management calls (free,malloc,calloc,realloc) to use the Apple Memory Manager, bypassing Symantec THINK C's inefficient memory manager.
  95. •Enhanced Assign.c slightly. PrintAnAssignment now prints enough digits to maintain the precision specified in float.h. This resolves the somewhat spurious errors reported by UnequalDescribedVars when doing read-after-write checks. Fixed PrintQuotedString to correctly handle strings containing the double-quote character. Cosmetic enhancement of how /* comments */ are printed, for nicer word wrap.
  96. •Added RemovePalette(window) to GDOpenWindow.c, which complements the pre-existing AddExplicitPalette(window).
  97.  
  98. CHANGES DURING 2/94:
  99. •Enhanced VBLInstall.c in response to query by Mike Tarr; it now runs forever if frames==-1.
  100. •Enhanced StringBounds.c to also count the black pixels. An argument was added.
  101.  
  102. CHANGES DURING 1/94:
  103. •Enhanced MultipleChoice.c to keep accepting characters until they uniquely specify an answer.
  104. •Added routines to Mean.c to accept arrays of signed or unsigned char, short, or long. All the routines have been optimized for speed.
  105. •Added StringBounds.c, which computes the minimum bounding rectangle for all the pixels that would be set black by calling DrawString with the given pascal string, in the current port, font, size, and style. CharBounds() creates a one-char string and calls StringBounds().
  106. •Added PrintfGWorld.c, for debugging, which uses "printf" to print out the GWorld as a gross bitmap.
  107.  
  108. All earlier changes appear in the file VideoToolbox:"Changes 1990-3".
  109.